/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package controller;

import dao.DienThoaiDAO;
import dao.util.HibernateUtil;
import java.util.ArrayList;
import java.util.List;
import javax.faces.bean.ManagedBean;
import javax.faces.bean.SessionScoped;
import pojo.Dienthoai;
import org.hibernate.Query;
import org.hibernate.Session;

/**
 *
 * @author Minh Tien
 */
@ManagedBean (name="dansachdienthoai")
@SessionScoped
public class TrangChu {

    /**
     * Creates a new instance of CheckRegister
     */
    static public boolean check =false;
    static public List<Dienthoai> ListDt;

    
    
    public TrangChu() 
    {
    }
    
    private static ArrayList<Dienthoai> danhsachtheosoluongban;
    
    public static ArrayList<Dienthoai> getDanhsachtheosoluongban() 
    {
        DienThoaiDAO dtdao = new DienThoaiDAO();
        danhsachtheosoluongban = dtdao.getDienthoaitheosoluongban();
        return danhsachtheosoluongban;
    }

    private static ArrayList<Dienthoai> danhsachtheosoluongxem;
    
    public static ArrayList<Dienthoai> getDanhsachtheosoluongxem()
    {
        DienThoaiDAO dtdao = new DienThoaiDAO();
        danhsachtheosoluongxem = dtdao.getDienthoaitheosoluongxem();
        return danhsachtheosoluongxem;
    }
    
    
}
